<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TVpage类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_vpage-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TVpage类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TVpage 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_vpage.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a53bc381af00a8ab7f6834b4f06edaa5b"><td class="memItemLeft" align="right" valign="top"><a id="a53bc381af00a8ab7f6834b4f06edaa5b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TVpage</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a53bc381af00a8ab7f6834b4f06edaa5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69b0a81f5d83fe0c93f829461fdbc332"><td class="memItemLeft" align="right" valign="top"><a id="a69b0a81f5d83fe0c93f829461fdbc332"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TVpage</b> (const vpage_t *nativeObj)</td></tr>
<tr class="separator:a69b0a81f5d83fe0c93f829461fdbc332"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a170257db78cc60420aaf887528964ae2"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_vpage.html#a170257db78cc60420aaf887528964ae2">SetUiAsset</a> (const char *ui_asset)</td></tr>
<tr class="separator:a170257db78cc60420aaf887528964ae2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49442421cf32b7fb437481934fb6dc1a"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_vpage.html#a49442421cf32b7fb437481934fb6dc1a">SetAnimHint</a> (const char *anim_hint)</td></tr>
<tr class="separator:a49442421cf32b7fb437481934fb6dc1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5d5f6e9b27331ddaf033b94edb0d5b9"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_vpage.html#ae5d5f6e9b27331ddaf033b94edb0d5b9">GetUiAsset</a> () const</td></tr>
<tr class="separator:ae5d5f6e9b27331ddaf033b94edb0d5b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6770d17135fd61cd1d61432c66e7076"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_vpage.html#aa6770d17135fd61cd1d61432c66e7076">GetAnimHint</a> () const</td></tr>
<tr class="separator:aa6770d17135fd61cd1d61432c66e7076"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a179d338835310b9da1337a267768a879"><td class="memItemLeft" align="right" valign="top"><a id="a179d338835310b9da1337a267768a879"></a>
static <a class="el" href="class_t_vpage.html">TVpage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a179d338835310b9da1337a267768a879"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26017ecd202f96c02564c68c44baf24f"><td class="memItemLeft" align="right" valign="top"><a id="a26017ecd202f96c02564c68c44baf24f"></a>
static <a class="el" href="class_t_vpage.html">TVpage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:a26017ecd202f96c02564c68c44baf24f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c62ff9d2f87ce71bc3444f87014ca12"><td class="memItemLeft" align="right" valign="top"><a id="a9c62ff9d2f87ce71bc3444f87014ca12"></a>
static <a class="el" href="class_t_vpage.html">TVpage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a9c62ff9d2f87ce71bc3444f87014ca12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a909f983b2de34b3ed532ffe982f8efc7"><td class="memItemLeft" align="right" valign="top"><a id="a909f983b2de34b3ed532ffe982f8efc7"></a>
static <a class="el" href="class_t_vpage.html">TVpage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a909f983b2de34b3ed532ffe982f8efc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77caa1304fa35a1519ca39892bd626e5"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_vpage.html#a77caa1304fa35a1519ca39892bd626e5">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a77caa1304fa35a1519ca39892bd626e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>虚拟页面(根据情况自动加载/卸载页面，并提供入场/出场动画)。</p>
<blockquote class="doxtable">
<p>虚拟页面只能作为pages的直接子控件使用。 </p>
</blockquote>
<p>如果指定了ui_asset:</p>
<p>当页面切换到后台时自动卸载，并触发EVT_VPAGE_CLOSE消息。 当页面切换到前台时自动加载，在动画前出发EVT_VPAGE_WILL_OPEN消息，在动画完成时触发 EVT_VPAGE_CLOSE消息。</p>
<p>vpage_t也可以当作普通view嵌入到pages中，让tab控件在切换时具有动画效果。</p>
<p>在xml中使用"vpage"标签创建控件。如：</p>
<div class="fragment"><div class="line">*<span class="comment">&lt;!-- ui --&gt;</span></div>
<div class="line">*&lt;<span class="keywordtype">vpage</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;c&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;50&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100&quot;</span> <span class="keyword">ui_asset</span>=<span class="stringliteral">&quot;mypage&quot;</span>/&gt;</div>
</div><!-- fragment --><p>可用通过style来设置控件的显示风格，如字体的大小和颜色等等(一般无需指定)。如：</p>
<div class="fragment"><div class="line">*<span class="comment">&lt;!-- style --&gt;</span></div>
<div class="line">*&lt;<span class="keywordtype">vpage</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span> /&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">vpage</span>&gt;</div>
</div><!-- fragment --> </div><h2 class="groupheader">成员函数说明</h2>
<a id="a77caa1304fa35a1519ca39892bd626e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77caa1304fa35a1519ca39892bd626e5">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TVpage::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建vpage对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>vpage对象。 </dd></dl>

</div>
</div>
<a id="aa6770d17135fd61cd1d61432c66e7076"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6770d17135fd61cd1d61432c66e7076">&#9670;&nbsp;</a></span>GetAnimHint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TVpage::GetAnimHint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>动画类型(目前支持：vtranslate: 垂直平移，htranslate: 水平平移)。 </p>

</div>
</div>
<a id="ae5d5f6e9b27331ddaf033b94edb0d5b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5d5f6e9b27331ddaf033b94edb0d5b9">&#9670;&nbsp;</a></span>GetUiAsset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TVpage::GetUiAsset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>UI资源名称。 </p>

</div>
</div>
<a id="a49442421cf32b7fb437481934fb6dc1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49442421cf32b7fb437481934fb6dc1a">&#9670;&nbsp;</a></span>SetAnimHint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TVpage::SetAnimHint </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>anim_hint</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置动画类型(vtranslate: 垂直平移，htranslate: 水平平移)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">anim_hint</td><td>动画类型。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a170257db78cc60420aaf887528964ae2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a170257db78cc60420aaf887528964ae2">&#9670;&nbsp;</a></span>SetUiAsset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TVpage::SetUiAsset </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ui_asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置 UI资源名称。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ui_asset</td><td>UI资源名称。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
